<?php
/* Smarty version 3.1.31, created on 2018-06-07 01:21:56
  from "D:\wamp64\www\wanju\views\adv\index.html" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.31',
  'unifunc' => 'content_5b18183407c016_25834315',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '93d4b7c813e9a2ac49fb7999a76aa380cdfcc0e8' => 
    array (
      0 => 'D:\\wamp64\\www\\wanju\\views\\adv\\index.html',
      1 => 1526569333,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5b18183407c016_25834315 (Smarty_Internal_Template $_smarty_tpl) {
?>

  <div class="x_panel">
    <div class="x_content" style="display: block;">
      <!--表格主体内容-->
      <div class="nav navbar-right panel_toolbox">
        <a class="fa fa-plus" href="/adv/add.html"> 添加</a>
      </div>
      <br><br>
      <div class="cont">
        <table class="table table-bordered table-striped">
          <thead>
          <tr>
            <th width="100px">序号</th>
            <th>广告标题</th>
            <th>广告位置</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['adv']->value['lists'], 'advitem');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['advitem']->value) {
?>
          <tr>
            <td><?php echo $_smarty_tpl->tpl_vars['advitem']->value['ad_id'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['advitem']->value['title'];?>
</td>
            <td><?php if ($_smarty_tpl->tpl_vars['advitem']->value['position'] == 1) {?>去买模块<?php } else { ?>去玩模块<?php }?></td>
            <td><?php if ($_smarty_tpl->tpl_vars['advitem']->value['status'] == 1) {?>有效<?php } else { ?>无效<?php }?></td>
            <td>
              <div class="x_content">
                <a class="btn btn-primary btn-xs" href="<?php $_template = new Smarty_Internal_Template('eval:'.U(array('adv/edit','ad_id'=>$_smarty_tpl->tpl_vars['advitem']->value['ad_id'])), $_smarty_tpl->smarty, $_smarty_tpl);echo $_template->fetch(); ?>"> 编辑</a>
                <button class="btn btn-danger btn-xs" data-toggle="dropdown"><?php if ($_smarty_tpl->tpl_vars['advitem']->value['status'] == 1) {?>设为无效<?php } else { ?>设为有效<?php }?>
                  <i class="icon-angle-down"></i></button>
                <ul class="dropdown-menu">
                  <li><a href="<?php $_template = new Smarty_Internal_Template('eval:'.U(array('adv/save-status','ad_id'=>$_smarty_tpl->tpl_vars['advitem']->value['ad_id'])), $_smarty_tpl->smarty, $_smarty_tpl);echo $_template->fetch(); ?>">确定</a></li>
                  <li><a href="javascript:;">取消</a></li>
                </ul>
              </div>
            </td>
          </tr>
          <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);
?>

          </tbody>
        </table>
        <!--分页-->

        <?php echo Yii::$app->view->render('/com/pager.php',array('pager'=>$_smarty_tpl->tpl_vars['adv']->value['pager']));?>

      </div>
    </div>
  </div>

<?php }
}
